#include "MiniBreakGameState.h"


MiniBreakGameState::MiniBreakGameState()
{
}


MiniBreakGameState::~MiniBreakGameState()
{
}

void MiniBreakGameState::startState(std::vector< std::vector<char> >& grid)
{
	GameState();
	m_rules.initPlayers(grid, m_players[0], m_players[1]);
}

void MiniBreakGameState::movePiece(std::vector< std::vector<char> >& grid, int fromX, int fromY, int toX, int toY)
{
	if (m_rules.isLegal(m_currentPlayer, grid, fromX, fromY, toX, toY))
	{
		GameState::movePiece(grid,fromX,fromY,toX,toY);
	}
	else
		std::cout << "Illegal move.\n";
}
